<?php
if($this->form) $form = $this->form; 
else $form = 'form-search';  
?>

<h2><?php echo $this->titulo; ?></h2>

<?php if($this->form_search){ ?>
<form id="<?php echo $form; ?>" method="post" class="<?php echo $form; ?>" action="<?php echo $this->url(array('controller' => $this->controller, 'action' => $this->action)); ?>">
    <div class="content_pes_av">
        <input type="text" id="inp-search" name="inp-search" class="inp-search" value="<?php echo $this->search; ?>" placeholder="Procurar" />
        <?php if($this->filtro){ ?>
            <?php echo $this->partial($this->controller.'/filtro.phtml', array('urlbase' => $this->urlbase,'controller' => $this->controller,'this'=>$this,'fb_appId'=> $this->fb_appId, 'fb_appSecret' => $this->fb_appSecret)); ?>
        <?php } ?> 
    </div>
</form>
<?php } ?> 

<?php if($this->add){ ?>
<a class="btn-add-list" href="<?php echo $this->url(array('controller' => $this->controller, 'action' => 'edit')); ?>">Adicionar</a>
<?php } ?> 
<script>
$(function(){
    $('.btn_pes_av').click(function(){
       if($('.content_it_pes').css('display') == 'none') $('.content_it_pes').show();
       else $('.content_it_pes').hide();
    });
    
})
</script>
